<template>
  <div class="location"
       @click.stop="handleMap">
    <span class="iconfont icon"
          v-show="distance > 0">&#xe601;{{distance}}km</span>
  </div>
</template>

<script>
export default {
  name: 'CommonLocation',
  props: {
    distance: {
      type: Number
    }
  },
  methods: {
    handleMap () {
      console.log('地图')
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '~stylus/variable.styl'
@import '~stylus/mixins.styl'

.location
  position absolute
  top 50px
  right 80px

  .icon
    font-size $smallFz
    color $graySecond
</style>
